package com.qfedu.mapper;

import com.qfedu.pojo.Sysrole;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface SysroleMapper {

    @Select("select * from sys_role")
    List<Sysrole> selectAll();

    @Select("select * from sys_role where id =#{id}")
    Sysrole selectById(Integer id);

    @Insert(" insert into sys_role values(#{id},#{name},#{description},#{createTime},#{updateTime}) ")
    Integer add(Sysrole sysrole);

    @Delete("delete from sys_role where id=#{id}")
    Integer delete(Integer id);

    @Update("update sys_role set name=#{name},description=#{description},createTime=#{createTime},updateTime=#{updateTime} where id= #{id} ")
    Integer update(Sysrole sysrole);
}
